﻿using log4net;

namespace La.Code.Log
{

    /// <summary>
    /// 日志
    /// </summary>
    public class LogInfo
    {
        //log4Custom
        //private static LogEntity2 _logEntity;
        //private  LogEntity2 BuildMessageMode(object message)
        //{
        //    if (_logEntity == null)
        //    {
        //        _logEntity = new LogEntity2();
        //        _logEntity.UserId = "ccc";
        //        _logEntity.UserName = "ddd";
        //        _logEntity.Message = message;
        //    }
        //    else
        //        _logEntity.Message = message;

        //    return _logEntity;
        //}

        private readonly ILog _logger;
        public LogInfo(ILog log)
        {
            _logger = log;
        }
        public void Debug(object message)
        {
            _logger.Debug(message);
        }
        public void Error(object message)
        {
            // _logger.Error(BuildMessageMode(message));
            _logger.Error(message);
        }
        public void Info(object message)
        {
            _logger.Info(message);
        }
        public void Warn(object message)
        {
            _logger.Warn(message);
        }
    }
}
